// AboutDialog
// $Id: AboutDialog.java,v 1.14 2003/06/03 23:44:29 axelwernicke Exp $
//
// Copyright (C) 2002-2003 Axel Wernicke <axel.wernicke@gmx.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
package de.axelwernicke.mypod.gui;


/**
 *
 * @author  axel wernicke
 */
public class AboutDialog extends javax.swing.JDialog {
    /** Creates new form AboutDialog
     * @param parent
     * @param modal
     */
    public AboutDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        getRootPane().setDefaultButton(okButton);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() //GEN-BEGIN:initComponents
     {
        java.awt.GridBagConstraints gridBagConstraints;

        logoLabel = new javax.swing.JLabel();
        aboutTabbedPane = new javax.swing.JTabbedPane();
        myPodPanel = new javax.swing.JPanel();
        versionLabel = new javax.swing.JLabel();
        versionContentLabel = new javax.swing.JLabel();
        totalClipsLabel = new javax.swing.JLabel();
        totalClipsContentLabel = new javax.swing.JLabel();
        totalDurationLabel = new javax.swing.JLabel();
        totalDurationContentLabel = new javax.swing.JLabel();
        totalSizeLabel = new javax.swing.JLabel();
        totalSizeContentLabel = new javax.swing.JLabel();
        dummy = new javax.swing.JPanel();
        iPodPanel = new javax.swing.JPanel();
        nameLabel = new javax.swing.JLabel();
        nameContentLabel = new javax.swing.JLabel();
        firmwareLabel = new javax.swing.JLabel();
        firmwareContentLabel = new javax.swing.JLabel();
        serialNumberLabel = new javax.swing.JLabel();
        serialNumberContentLabel = new javax.swing.JLabel();
        discSizeLabel = new javax.swing.JLabel();
        discSizeContentLabel = new javax.swing.JLabel();
        spaceLeftLabel = new javax.swing.JLabel();
        spaceLeftContentLabel = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        creditsPanel = new javax.swing.JPanel();
        copyrightLabel = new javax.swing.JLabel();
        authorLabel = new javax.swing.JLabel();
        authorMailLabel = new javax.swing.JLabel();
        creditsTextPane = new javax.swing.JTextPane();
        dummy1 = new javax.swing.JPanel();
        buttonPanel = new javax.swing.JPanel();
        okButton = new javax.swing.JButton();

        setTitle(GuiUtils.getStringLocalized("resource/language", "aboutMyPod"));
        setName("aboutDialog");
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    closeDialog(evt);
                }
            });

        logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resource/splash.jpg")));
        logoLabel.setBorder(new javax.swing.border.EtchedBorder());
        logoLabel.setMaximumSize(new java.awt.Dimension(200, 250));
        logoLabel.setMinimumSize(new java.awt.Dimension(200, 250));
        logoLabel.setPreferredSize(new java.awt.Dimension(200, 250));
        getContentPane().add(logoLabel, java.awt.BorderLayout.WEST);

        aboutTabbedPane.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED));
        aboutTabbedPane.setMinimumSize(new java.awt.Dimension(250, 250));
        aboutTabbedPane.setPreferredSize(new java.awt.Dimension(250, 250));
        myPodPanel.setLayout(new java.awt.GridBagLayout());

        versionLabel.setForeground(new java.awt.Color(102, 102, 153));
        versionLabel.setText(GuiUtils.getStringLocalized("resource/language", "version:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(12, 5, 0, 0);
        myPodPanel.add(versionLabel, gridBagConstraints);

        versionContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        versionContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 0.1;
        gridBagConstraints.insets = new java.awt.Insets(12, 11, 0, 12);
        myPodPanel.add(versionContentLabel, gridBagConstraints);

        totalClipsLabel.setForeground(new java.awt.Color(102, 102, 153));
        totalClipsLabel.setText(GuiUtils.getStringLocalized("resource/language", "totalTracks:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        myPodPanel.add(totalClipsLabel, gridBagConstraints);

        totalClipsContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        myPodPanel.add(totalClipsContentLabel, gridBagConstraints);

        totalDurationLabel.setForeground(new java.awt.Color(102, 102, 153));
        totalDurationLabel.setText(GuiUtils.getStringLocalized("resource/language", "totalTime:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        myPodPanel.add(totalDurationLabel, gridBagConstraints);

        totalDurationContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        totalDurationContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        myPodPanel.add(totalDurationContentLabel, gridBagConstraints);

        totalSizeLabel.setForeground(new java.awt.Color(102, 102, 153));
        totalSizeLabel.setText(GuiUtils.getStringLocalized("resource/language", "totalFilesize:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        myPodPanel.add(totalSizeLabel, gridBagConstraints);

        totalSizeContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        myPodPanel.add(totalSizeContentLabel, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weighty = 1.0;
        myPodPanel.add(dummy, gridBagConstraints);

        aboutTabbedPane.addTab("myPod", myPodPanel);

        iPodPanel.setLayout(new java.awt.GridBagLayout());

        iPodPanel.setMinimumSize(new java.awt.Dimension(198, 199));
        iPodPanel.setPreferredSize(new java.awt.Dimension(198, 199));
        nameLabel.setForeground(new java.awt.Color(102, 102, 153));
        nameLabel.setText(GuiUtils.getStringLocalized("resource/language", "name:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(12, 5, 0, 0);
        iPodPanel.add(nameLabel, gridBagConstraints);

        nameContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        nameContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 0.1;
        gridBagConstraints.insets = new java.awt.Insets(12, 11, 0, 12);
        iPodPanel.add(nameContentLabel, gridBagConstraints);

        firmwareLabel.setForeground(new java.awt.Color(102, 102, 153));
        firmwareLabel.setText(GuiUtils.getStringLocalized("resource/language", "firmwareVersion"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        iPodPanel.add(firmwareLabel, gridBagConstraints);

        firmwareContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        firmwareContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        iPodPanel.add(firmwareContentLabel, gridBagConstraints);

        serialNumberLabel.setForeground(new java.awt.Color(102, 102, 153));
        serialNumberLabel.setText(GuiUtils.getStringLocalized("resource/language", "serialNumber"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        iPodPanel.add(serialNumberLabel, gridBagConstraints);

        serialNumberContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        serialNumberContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        iPodPanel.add(serialNumberContentLabel, gridBagConstraints);

        discSizeLabel.setForeground(new java.awt.Color(102, 102, 153));
        discSizeLabel.setText(GuiUtils.getStringLocalized("resource/language", "discSize:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        iPodPanel.add(discSizeLabel, gridBagConstraints);

        discSizeContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        discSizeContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        iPodPanel.add(discSizeContentLabel, gridBagConstraints);

        spaceLeftLabel.setForeground(new java.awt.Color(102, 102, 153));
        spaceLeftLabel.setText(GuiUtils.getStringLocalized("resource/language", "spaceLeft:"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        iPodPanel.add(spaceLeftLabel, gridBagConstraints);

        spaceLeftContentLabel.setFont(new java.awt.Font("Dialog", 1, 10));
        spaceLeftContentLabel.setMaximumSize(new java.awt.Dimension(250, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 12);
        iPodPanel.add(spaceLeftContentLabel, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weighty = 1.0;
        iPodPanel.add(jPanel2, gridBagConstraints);

        aboutTabbedPane.addTab("iPod", iPodPanel);

        creditsPanel.setLayout(new java.awt.GridBagLayout());

        copyrightLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        copyrightLabel.setText(GuiUtils.getStringLocalized("resource/language", "licenseMessage"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 12);
        creditsPanel.add(copyrightLabel, gridBagConstraints);

        authorLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        authorLabel.setText(GuiUtils.getStringLocalized("resource/language", "authorMessage"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 12);
        creditsPanel.add(authorLabel, gridBagConstraints);

        authorMailLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        authorMailLabel.setText(GuiUtils.getStringLocalized("resource/language", "authorMailMessage"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 12, 12);
        creditsPanel.add(authorMailLabel, gridBagConstraints);

        creditsTextPane.setEditable(false);
        creditsTextPane.setFont(new java.awt.Font("Dialog", 1, 12));
        creditsTextPane.setText(GuiUtils.getStringLocalized("resource/language", "creditsOS"));
        creditsTextPane.setMinimumSize(new java.awt.Dimension(200, 130));
        creditsTextPane.setPreferredSize(new java.awt.Dimension(200, 130));
        creditsTextPane.setOpaque(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 12);
        creditsPanel.add(creditsTextPane, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weighty = 1.0;
        creditsPanel.add(dummy1, gridBagConstraints);

        aboutTabbedPane.addTab(GuiUtils.getStringLocalized("resource/language", "credits"), creditsPanel);

        getContentPane().add(aboutTabbedPane, java.awt.BorderLayout.CENTER);

        okButton.setText(GuiUtils.getStringLocalized("resource/language", "close"));
        okButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    okButtonActionPerformed(evt);
                }
            });

        buttonPanel.add(okButton);

        getContentPane().add(buttonPanel, java.awt.BorderLayout.SOUTH);

        pack();
    } //GEN-END:initComponents

    /**
     * @param evt
     */
    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) //GEN-FIRST:event_okButtonActionPerformed
     { //GEN-HEADEREND:event_okButtonActionPerformed
        setVisible(false);
        dispose();
    } //GEN-LAST:event_okButtonActionPerformed

    /** Closes the dialog
     * @param evt
     */
    private void closeDialog(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_closeDialog
        setVisible(false);
        dispose();
    } //GEN-LAST:event_closeDialog

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane aboutTabbedPane;
    private javax.swing.JLabel authorLabel;
    private javax.swing.JLabel authorMailLabel;
    private javax.swing.JPanel buttonPanel;
    private javax.swing.JLabel copyrightLabel;
    private javax.swing.JPanel creditsPanel;
    private javax.swing.JTextPane creditsTextPane;
    public javax.swing.JLabel discSizeContentLabel;
    private javax.swing.JLabel discSizeLabel;
    private javax.swing.JPanel dummy;
    private javax.swing.JPanel dummy1;
    public javax.swing.JLabel firmwareContentLabel;
    private javax.swing.JLabel firmwareLabel;
    private javax.swing.JPanel iPodPanel;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JLabel logoLabel;
    private javax.swing.JPanel myPodPanel;
    public javax.swing.JLabel nameContentLabel;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JButton okButton;
    public javax.swing.JLabel serialNumberContentLabel;
    private javax.swing.JLabel serialNumberLabel;
    public javax.swing.JLabel spaceLeftContentLabel;
    private javax.swing.JLabel spaceLeftLabel;
    public javax.swing.JLabel totalClipsContentLabel;
    private javax.swing.JLabel totalClipsLabel;
    public javax.swing.JLabel totalDurationContentLabel;
    private javax.swing.JLabel totalDurationLabel;
    public javax.swing.JLabel totalSizeContentLabel;
    private javax.swing.JLabel totalSizeLabel;
    public javax.swing.JLabel versionContentLabel;
    private javax.swing.JLabel versionLabel;

    // End of variables declaration//GEN-END:variables
}
